using Prism.Commands;
using PrismPractice.Const;
using PrismPractice.Core.Mvvm;
using PrismPractice.Core.Prism;
using PrismPractice.UserControls.ViewModels;

namespace PrismPractice.ViewModels.Secondary
{
	public class Secondary1ViewModel : SecondaryViewModelBase
	{
		#region 成员/构造

		public Secondary1ViewModel() : base(nameof(Secondary1ViewModel))
		{
			
		}

		#endregion

		#region 绑定
		#endregion

		#region 命令

		#region [命令] 弹出模态弹窗
		private DelegateCommand _ShowDialogCmd;
		/// <summary>
		/// [命令] 弹出模态弹窗
		/// </summary>
		public new DelegateCommand ShowDialogCmd => _ShowDialogCmd ??= new DelegateCommand(ExecuteShowDialogCmd);
		private void ExecuteShowDialogCmd()
		{
            DialogService.ShowDialog(ViewNames.DIALOG_EXAMPLE_1, null, null);
        }
		#endregion

		#region [命令] 弹出非模态弹窗
		private DelegateCommand _ShowWindowCmd;
		/// <summary>
		/// [命令] 弹出非模态弹窗
		/// </summary>
		public DelegateCommand ShowWindowCmd => _ShowWindowCmd ??= new DelegateCommand(ExecuteShowWindowCmd);
		private void ExecuteShowWindowCmd()
		{
            var vm = new UcDialogExample1ViewModel()
            {
                ShowContent = "此为绑定内容，当前窗口为非模态弹窗",
            };

            DialogService.Show(ViewNames.DIALOG_EXAMPLE_1, vm);
        }
		#endregion

		#region [命令] 弹窗到第二屏
		private DelegateCommand _ShowWinToSecondScreenCmd;
		/// <summary>
		/// [命令] 弹窗到第二屏
		/// </summary>
		public DelegateCommand ShowWinToSecondScreenCmd => _ShowWinToSecondScreenCmd ??= new DelegateCommand(ExecuteShowWinToSecondScreenCmd);
		private void ExecuteShowWinToSecondScreenCmd()
        {
            var vm = new UcDialogExample1ViewModel()
            {
				ShowContent = "此为绑定内容，当前窗口应该会显示在右侧副屏（如果有的话）",
            };

            DialogService.Show(ViewNames.DIALOG_EXAMPLE_1, vm, null, WindowNames.SECOND_SCREEN_WINDOW);
		}
		#endregion

		#endregion

		#region 方法
		#endregion
	}
}
